<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" onsubmit="return false">

    <div class="form-group">
        <label for="project_id" class="control-label col-xs-12 col-sm-2">{:__('Project')}:</label>
        <div class="col-xs-12 col-sm-6">
            <div class="form-control">
                {$pmodel.name}
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="startdate" class="control-label col-xs-12 col-sm-2">{:__('StartDate')}:</label>
        <div class="col-xs-12 col-sm-6">
            <div class="form-control">
                {$pmodel.startdate|datetime='Y-m-d'}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="endate" class="control-label col-xs-12 col-sm-2">{:__('EndDate')}:</label>
        <div class="col-xs-12 col-sm-6">
            <div class="form-control">
                {$pmodel.endate|datetime='Y-m-d'}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="totalamount" class="control-label col-xs-12 col-sm-2">{:__('TotalAmount')}:</label>
        <div class="col-xs-12 col-sm-6">
            <div class="form-control">
                {$pmodel.totalamount}
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="suppliercid" class="control-label col-xs-12 col-sm-2">{:__('Supplier')}:</label>
        <div class="col-xs-12 col-sm-6">
            <div class="form-control">
                {$supplier.companyname}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="suppliercid" class="control-label col-xs-12 col-sm-2">{:__('AddAmount')}:</label>
        <div class="col-xs-12 col-sm-6">

            <input type="text" class="form-control" id="addamount" name="addamount" value="0" data-rule="required;decimal" />

        </div>
    </div>

    <div class="form-group">
        <div class="col-xs-12 col-sm-6">
            <button type="button" value="添加支出" id="bntaddpay">添加支出</button>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 col-sm-10">
            <table class="table">
                <tr>
                    <th>支出说明</th>
                    <th>备注</th>
                    <th>应付金额</th>
                    <th>支付状态</th>
                    <!-- <th>操作</th> -->
                </tr>
                {foreach name="paylist" item="vo"}

                <tr style="text-align: center;">
                    <td>{$vo.summary}</td>
                    <td>{$vo.remark}</td>
                    <td>{$vo.amount}</td>
                    <td>
                        {$status[$vo.status]}
                    </td>
                    <!-- <td>
                        {if $vo.status==0}
                        <button type="button" class="delpaybnt" data-id="{$vo.id}">删除</button>
                        <input type="hidden" name="payid" value="{$vo.id}" />
                        <input type="hidden" name="amount" value="{$vo.amount}" /> 
                        {/if}
                    </td>  -->
                </tr>
                {if $vo.status==0}

                <input type="hidden" name="payid" value="{$vo.id}" />
                <input type="hidden" name="amount" value="{$vo.amount}" /> {/if} {/foreach}

        </div>
    </div>
    <input type="hidden" name="projectid" id="projectid" value="{$pmodel.id}" />
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success btn-embossed" id="subbutton">提交支付申请</button>
            <button type="button" class="btn btn-default btn-embossed" onClick="closeLayerWin(this)">{:__('Close')}</button>
        </div>
    </div>
</form>